package com.ea.common.auth;

import com.ea.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(
        name = "ea-admin",
        url = "${lb.url}/ea-admin",
        configuration = FeignConfig.class
)
public interface AdminFeign {
    @GetMapping("/auth/getCurrentUser")
    Result<NowUser> getNowUserByUsername(@RequestParam String username);

    @PostMapping("/actuator/refresh")
    List<String> refresh();
}
